
// Get the path of the currently running do-file
local do_file_path `c(pwd)'

// Change the working directory to the location of the do-file
cd "`do_file_path'"

clear
use "proc_data\tt2control_cities.dta"
*rename fishnet_lake_chad_ntl_x_d01 objectid
*keep if objectid!=.
rename *, lower

sort objectid

gen tt2cap = .

replace tt2cap = tt2yaounde if gid_0=="CMR"
replace tt2cap = tt2niamey if gid_0=="NER"
replace tt2cap = tt2abuja if gid_0=="NGA"
replace tt2cap = tt2ndjamena if gid_0=="TCD"

gen tt2pri = . 
replace tt2pri = tt2douala if gid_0=="CMR"
replace tt2pri = tt2niamey if gid_0=="NER"
replace tt2pri = tt2lagos if gid_0=="NGA"
replace tt2pri = tt2ndjamena if gid_0=="TCD"

label variable tt2cap "travel time to capital open border (assigned pixel level value for border shapes)"
label variable tt2pri "travel time to primary city open border (assigned pixel level value for border shapes)"
label variable tt2ndjamena "travel time to N'djamena open border (assigned pixel level value for border shapes)"

keep objectid gid_0 tt2cap tt2pri tt2ndjamena

save "proc_data\TT_CONTROL_CITIES.dta", replace
